package com.woniuxy.orderclient.client;


import com.woniuxy.core.model.Result;
import com.woniuxy.orderclient.client.dto.CoachReservInfoDto;
import com.woniuxy.orderclient.client.dto.TeamProductDto;
import com.woniuxy.orderclient.client.dto.TeamReservDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("product-server")
public interface ProductFeignClient {

    //教练端根据id查私教预约
    @GetMapping("/product/coachReserv/findById.coach")
    public Result<CoachReservInfoDto> findCoachReservById(@RequestParam("coachReservId") Integer coachReservId);

    //根据id查看团课预约
    @GetMapping("/product/teamReservation/findById")
    public Result<TeamReservDto> findTeamReservationById(@RequestParam("reservationId") Integer reservationId);

    //根据产品id查找团课产品信息
    @GetMapping("/product/teamProduct/findById")
    public Result<TeamProductDto> findTeamProductById(@RequestParam("teamProductId") Integer teamProductId);

    //修改团课邀请状态
    @GetMapping("/product/teamReservation/updateState")
    public Result updateTeamReservState(@RequestParam("state") Integer state,@RequestParam("reservationId") Integer reservationId);
}
